package top.zhangjianyong.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
import top.zhangjianyong.blog.entity.po.File;
import top.zhangjianyong.blog.params.file.UploadParam;
import top.zhangjianyong.blog.response.ApiResponse;

/**
 * 文件service
 *
 * @author zhangjianyong
 * @since 2024/7/25 下午11:03
 */
public interface FileService extends IService<File> {
    ApiResponse upload(UploadParam param);

    ApiResponse get(Long id, HttpServletResponse response);

    File save(MultipartFile file, Integer type) throws IOException;

    List<File> save(List<MultipartFile> files, Integer type) throws IOException;

}
